= form_for [:admin, @application], url: @url, html: {class: 'form-horizontal', role: 'form'} do |f|
  = form_errors(application)

  = content_tag :div, class: 'form-group' do
    = f.label :name, "名称", class: 'col-sm-2 control-label'
    .col-sm-10
      = f.text_field :name, class: 'form-control'
      = doorkeeper_errors_for application, :name
  = content_tag :div, class: 'form-group' do
    = f.label :redirect_uri, "重定向 URI", class: 'col-sm-2 control-label'
    .col-sm-10
      = f.text_area :redirect_uri, class: 'form-control'
      = doorkeeper_errors_for application, :redirect_uri
      %span.help-block
        每个 URI 使用一行
      - if Doorkeeper.configuration.native_redirect_uri
        %span.help-block
          使用
          %code= Doorkeeper.configuration.native_redirect_uri
          作为本地测试
  .form-actions
    = f.submit '提交', class: "btn btn-save wide"
    = link_to "取消", admin_applications_path, class: "btn btn-default"
